<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function a(a, b, c, ...z) {
            console.log(a);
            console.log(b);
            console.log(c);
            console.log(z);
        };
        a(10, 20, 30, 40);

        function b(...val) {
            console.log(...val);
        };
        b(100, 200, 300, 400);
    </script>
</body>

</html>